package net.tngou.crawler.quartz;

import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import net.tngou.crawler.jdbc.DBManager;
import net.tngou.crawler.service.CrawlerService;


public class GetDataJob implements Job {
	private static Logger _log = LoggerFactory.getLogger(GetDataJob.class);
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		_log.info("执行作业： "+context.getJobDetail().getKey() +"  执行时间："+new Date()+"********************************");
		
		CrawlerService service = new CrawlerService();
		service.saveData();
		DBManager.closeConnection();
	

	}
	
}

